package appconfig

import "github.com/spf13/viper"

type Mysql struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}

type Redis struct {
	Host     string
	Port     int
	Password string
}

type Appconfig struct {
	Mysql
	Redis
}

var Config Appconfig

func Init() {
	viper.SetConfigFile("appconfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&Config)
}
